package com.csair.seam.infrastructure.web;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @Author: wurunbin
 * @Date: 2018/8/21 16:27
 * @Description:
 **/
@Setter
@Getter
@NoArgsConstructor
public class BaseResponse<T> {

    //状态码
    private Integer code;

    //如果出现异常，反馈异常信息
    private String msg;

    //返回对象
    private T data;

    public BaseResponse(Integer code, String message) {
        this.code = code;
        this.msg = message;
    }

    public BaseResponse(Integer code, String message, T t) {
        this.code = code;
        this.msg = message;
        this.data = t;
    }
}
